Skip to content

feat(charm): adds 'huh' dynamic forms to create command#362

Open
srtaalej wants to merge 2 commits intomainfrom
charm-dynamic-forms
Open

feat(charm): adds 'huh' dynamic forms to create command#362
srtaalej wants to merge 2 commits intomainfrom
charm-dynamic-forms

Conversation

@srtaalej
Copy link
Contributor

@srtaalej srtaalej commented Mar 3, 2026

Changelog

When the charm experiment is enabled, slack create now presents a single interactive form for selecting both the app category and language template, with options that update dynamically as you navigate. 🦋

Summary

This PR replaces the survey-based two-step category/template prompt with a single-screen 'huh' form when the charm experiment is enabled. Category and language selects render together; changing the category dynamically updates the template options via OptionsFunc.

Screen.Recording.2026-03-03.at.1.18.47.PM.mov

Testing

  • make build — 0 issues
  • make test — all tests pass
  • ./bin/slack create --experiment=charm — form renders with category and template on one screen; changing category updates template options; "View more samples" shows browse option

Requirements

@srtaalej srtaalej added this to the Next Release milestone Mar 3, 2026
@srtaalej srtaalej self-assigned this Mar 3, 2026
@srtaalej srtaalej requested a review from a team as a code owner March 3, 2026 18:22
@srtaalej srtaalej added enhancement M-T: A feature request for new functionality experiment Experimental feature accessed behind the --experiment flag or toggle semver:patch Use on pull requests to describe the release version increment labels Mar 3, 2026
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.05%. Comparing base (c449532) to head (bbba8d6).

Files with missing lines Patch % Lines
cmd/project/create_template_charm.go 52.27% 21 Missing ⚠️
cmd/project/create_template.go 37.50% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
- Coverage   65.06%   65.05%   -0.02%     
==========================================
  Files         215      216       +1     
  Lines       18179    18231      +52     
==========================================
+ Hits        11829    11860      +31     
- Misses       5254     5273      +19     
- Partials     1096     1098       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Love the video and this is looking good!

🧪 I'll manually test this shortly, but wanted to share some quick feedback. I noticed that the patch test coverage is 50%. It would be nice to get that around 70% to keep our code coverage increasing slightly. I've left one comment that might allow us to boost the test coverage.

Comment on lines +34 to +35
// charmPromptTemplateSelectionFunc is a package-level function variable for test overriding.
var charmPromptTemplateSelectionFunc = charmPromptTemplateSelection
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Do we need this testing override? We are trying to remove this pattern and a glance at charmPromptTemplateSelection looks like we can test this function safely since clients and clients.IO have mocks available. 🤞🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ill look into this!

Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 I took it for a test run and it's looking pretty nice! I found a few UX quirks that I'd like to point out. They may be out-of-scope of this PR because they feel related to theming and viewport sizing (just a hunch).

Dark Mode Theme

I'm loving our Slack Theme 💅🏻 but is it possible to have different colours for light and dark terminals? For example, the aubergine is difficult to read on a dark terminal window.

Image

Language Selector Scrolls when Navigating Up/Down

When I select a language, the options move when I navigate up/down. I'd expect this if I'm hitting the bottom and there are more options, but the current UX feels odd. It happens for 2 and 3 language options.

2026-03-06-create-charm-vertical-shift.mov

View More Samples Scrolling Stops Showing Selection after 2nd Option

When selecting to view more samples, the highlighted selection disappears after the 2nd option. It becomes a bit of a mystery which one is going to be selected.

2026-03-06-create-charm-view-more.mov

@srtaalej
Copy link
Contributor Author

srtaalej commented Mar 9, 2026

@mwbrooks thank you for the review 🙏 left my responses below

Dark Mode Theme

I'm loving our Slack Theme 💅🏻 but is it possible to have different colours for light and dark terminals? For example, the aubergine is difficult to read on a dark terminal window.

fortunately lipgloss allows for adaptive colors for dark and light mode. I did have some issues with it though which is why the adaptive colors arent in this PR. im working on consolidating the theme in this PR

Language Selector Scrolls when Navigating Up/Down

When I select a language, the options move when I navigate up/down. I'd expect this if I'm hitting the bottom and there are more options, but the current UX feels odd. It happens for 2 and 3 language options.

View More Samples Scrolling Stops Showing Selection after 2nd Option

When selecting to view more samples, the highlighted selection disappears after the 2nd option. It becomes a bit of a mystery which one is going to be selected.

I'm trying to figure out how to resolve these UI bugs - but to no avail. I'm going to float this up to the Charm team 🫡

@mwbrooks
Copy link
Member

mwbrooks commented Mar 9, 2026

I'm trying to figure out how to resolve these UI bugs - but to no avail. I'm going to float this up to the Charm team 🫡

Thanks @srtaalej! Sadly, I think we need to resolve these UI bugs before we can ship the charm experiment. I'd assume it's something minor since it's affecting all of our prompts. 🤔

@mwbrooks
Copy link
Member

mwbrooks commented Mar 9, 2026

@srtaalej After you look at bumping the test coverage of this PR, we can merge it :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality experiment Experimental feature accessed behind the --experiment flag or toggle semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants